package com.heima.media.feign;

import com.heima.common.dto.ResponseResult;
import com.heima.media.dto.ArticleDto;
import com.heima.media.entity.ApArticle;
import com.heima.media.entity.ApAuthor;
import io.swagger.models.auth.In;
import org.checkerframework.checker.units.qual.A;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-article")
public interface ArticleFeign {

    @PostMapping("/api/v1/article")
    public ResponseResult<Long> saveArticle(@RequestBody ArticleDto dto);

    @GetMapping("/api/v1/author/{id}")
    public ResponseResult<ApAuthor> getAuthorById(@PathVariable("id") Integer id);

    /*@PostMapping("/selectArticle/{id}")
    public ApArticle selectArticleById(@PathVariable("id") Integer id);*/

}
